package com.kongyz;

import com.kongyz.strategy.OperationAdd;
import com.kongyz.strategy.OperationMultiply;
import com.kongyz.strategy.OperationSubstract;

/**
 * @author kongyz
 * @date 2018/7/5 22:37
 * @Description:
 */
public class Demo {

    public static void main(String[] args) {
        Context context=new Context(new OperationAdd());
        System.out.println("10+5="+context.executeStrategy(10,5));

        context=new Context(new OperationMultiply());
        System.out.println("10*5="+context.executeStrategy(10,5));

        context=new Context(new OperationSubstract());
        System.out.println("10-5="+context.executeStrategy(10,5));
    }
}
